<div id="header">
    <div class="grid">
        <div class="logo">
            <img src="__PUBLIC__/bwc/img/logo-1.png"/>
        </div>
        <div class="name">
            <img src="__PUBLIC__/bwc/img/logo-2.png"/>
        </div>
        <div class="clearfix"></div>
        <ul class="headerNav">
            <li><a href="index.php?m=home&c=post&a=page&info=3">部门介绍</a></li>
            <li><a href="index.php?m=home&c=cat&a=detail&info=41">图片新闻</a></li>
            <li><a href="index.php?m=home&c=cat&a=detail&info=43">失物招领</a></li>
            <li><a href="mailto:baoweichu@gdcc.edu.cn">处长信箱</a></li>
        </ul>
        <span id="metaWord">——竭诚为师生员工服务</span>
        <div class="search">
            <span class="glyphicon glyphicon-search"></span>
            <input type="text" name="keyword" id="search" placeholder="搜索" onkeydown="enterIn(event);" required>
            <button class="searchButton"  id="submit" onclick="search()">搜索</button>

        </div>
    </div>

</div>
<div class="clearfix">
</div>
<div id="nav" class="grid">
    <ul>
        <volist name="home_menu" id="menu_item">
            <if condition="$menu_item['menu_children'] == null">
                <li><a href="{$menu_item['menu_abs_url']}">{$menu_item['menu_name']}</a></li>
                <else/>
                <li>
                    <a href="{$menu_item['menu_abs_url']}">{$menu_item['menu_name']}</a>
                    <ul>
                        <volist name="menu_item['menu_children']" id="menu_item_child">
                            <li><a href="{$menu_item_child['menu_abs_url']}">{$menu_item_child['menu_name']}</a>
                            </li>
                        </volist>
                    </ul>
                </li>
            </if>
        </volist>
    </ul>
</div>

<script language="JavaScript">
    function search(){
        var keylist=document.getElementsByName("keyword");
        var keyword;
        if(keylist[0].value!="")
            keyword = keylist[0].value;
        else
            keyword = keylist[1].value;
        window.location="{:U('Home/Archive/search')}"+"&keyword="+keyword;
    }
    function enterIn(evt){
        var keylist=document.getElementsByName("keyword");
        var keyword;
        if(keylist[0].value!="")
            keyword = keylist[0].value;
        else
            keyword = keylist[1].value;
        var evt=evt?evt:(window.event?window.event:null);//兼容IE和FF
        if (evt.keyCode==13){
            window.location="{:U('Home/Archive/search')}"+"&keyword="+keyword;
        }
    }
</script>